<template>
  <div class="news-detail-wrap">
    <div class="news-title">{{info.name || info.aname}}</div>
    <div class="suit-info flex al-c jc-sb">
      <div class="flex">
        {{info.createdTime | dateFormat}}
      </div>
      <div>
        浏览：{{info.count || 0}}次
      </div>
    </div>
    <div class="detail-html" v-html="info.content"></div>
    <div class="section-title p0" v-if="false">
      <div class="left-text flex">
        <div class="blue-text">商品</div>
        <div class="red-text">商品</div>
      </div>
    </div>
    <div class="course-list-box flex jc-sb" v-if="false">
      <router-link class="item" to="" v-for="v in 4">
        <l-image src="https://iph.href.lu/750x300?bg=dddddd" width="345" height="200"></l-image>
        <div class="name">
          阿斯达实打实大所大厦大
        </div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NewsDetail',
  data() {
    return {
      info: null,
      type: ''
    }
  },
  computed: {},
  async created() {
  },
  async mounted() {
    this.getInfo()
  },
  components: {},
  methods: {
    async getInfo() {
      try {
        const {data} = await this.$api.news.detail(this.$route.params.id)
        this.info = data
      } catch (e) {
        console.error(e)
      }
    },
  }
}
</script>

<style lang="scss">
@import "./style";
</style>
